package edu.sctu.practice.class01.huangtianlin.assign3.two;

/**
 * Created by Administrator on 2015/10/22.
 */


public class Rectangle extends GeomertricObject {

    double width;
    double length;
    double area;
    double Perimeter;
    String color;


    public Rectangle(String color, double width, double length) {
        super(color);

        this.color = color;
        this.width = width;
        this.length = length;

    }

    @Override
    public double findArea() {

        area = width * length;

        return area;
    }

    @Override
    public double findPerimeter() {

        Perimeter =  2*(width+length);

        return Perimeter;


    }

    @Override
    public void inputInfo() {

        System.out.println("颜色"+color+"宽度"+width+"高度"+length);

    }
}